package com.ruoyi.system.api.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.web.domain.BaseEntity;

import java.util.List;

/**
 * 附件对象 attachment
 *
 * @author luogongquan
 * @date 2024-09-18
 */
public class Attachment extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /** 附件名称 */
    @Excel(name = "附件名称")
    private String name;

    /** 文件大小 */
    @Excel(name = "文件大小")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long size;

    /** 文件的MD5值 */
    @Excel(name = "文件的MD5值")
    private String hash;

    /** 文件系统fieldId */
    @Excel(name = "文件系统fileId")
    private String fileId;
    /** 文件系统fieldId */
    private List<String> fileIds;

    /** 类型（1:图片，2视频，3：word） */
    @Excel(name = "类型", readConverterExp = "1=:图片，2视频，3：word")
    private String type;
    /**
     * 关联主体
     */
    private Long associatedId;
    /**
     * 关联主体
     */
    private List<Long> associatedIds;

    private String url;

    public List<Long> getAssociatedIds() {
        return associatedIds;
    }

    public void setAssociatedIds(List<Long> associatedIds) {
        this.associatedIds = associatedIds;
    }

    public List<String> getFileIds() {
        return fileIds;
    }

    public void setFileIds(List<String> fileIds) {
        this.fileIds = fileIds;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Long getAssociatedId() {
        return associatedId;
    }

    public void setAssociatedId(Long associatedId) {
        this.associatedId = associatedId;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setSize(Long size)
    {
        this.size = size;
    }

    public Long getSize()
    {
        return size;
    }
    public void setHash(String hash)
    {
        this.hash = hash;
    }

    public String getHash()
    {
        return hash;
    }
    public void setFileId(String fileId)
    {
        this.fileId = fileId;
    }

    public String getFileId()
    {
        return fileId;
    }
    public void setType(String type)
    {
        this.type = type;
    }

    public String getType()
    {
        return type;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("size", getSize())
                .append("hash", getHash())
                .append("fileId", getFileId())
                .append("type", getType())
                .append("createTime", getCreateTime())
                .toString();
    }
}